package boun.center;

import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.util.Calendar;

public class CmpeNews {
	private String url, subject, content;
	private Calendar creationDate;
	private final String CHARSET = "ISO-8859-9";

	public void setUrl(String url) {
        this.url = url;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void setCreationDate(Calendar creationDate) {
        this.creationDate = creationDate;
    }

    public CmpeNews() { }
    public CmpeNews(String url, String subject, String content, String dateString) {
		this.url = url;
		this.subject = subject;
        try {
            this.content = new String(content.getBytes(CHARSET),Charset.forName(CHARSET));
        } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
	}

	public String getUrl() {
		return url;
	}

	public Calendar getCreationDate() {
        return creationDate;
    }

    public String getCHARSET() {
        return CHARSET;
    }

    public String getSubject() {
		return subject;
	}

	public String getContent() {
		return content;
	}
	
}